create table userinfo(id number primary key,username varchar2(32) not null,password varchar2(32));

create sequence user_seq start with 1 increment by 1;

alter table userinfo add constraint UNIQUE_USERNAME unique (username);

insert into userinfo(id,username,password) values(user_seq.nextval,'mike','222');

java.sql.SQLIntegrityConstraintViolationException: